$(function(){
    //common
    /*;(function(){
        $.ajax({// ../articledetail/list.do
            url:'data/xCommon.json',
            async:false,
            data:{cid:''},
            success:function(json){
                var XHtml=template('xScr', json.data);
                $('#xCont').html(XHtml);
            }
        })
    })();*/
/*
    cid=904
 */
    var size = 8;
    var name = 'jiyejiazhuanfang';

    geetdata("hxclub/article/pagelist.do", {
        cid:904,
        status:1,
        pageNo:1,
        pageSize:size
    }, "#xCont", "xScr", name, false, ZZ);


    function initPagination1(name) {

        //var value = $.cookie(name);
        var value = $.cookie(name);
        var opation = JSON.parse(value);
        var num_entries = opation.total; // $("#hiddenresult div.result").length;

        // 创建分页
        $("#Pagination1").pagination(num_entries, {
            num_edge_entries: 1, //边缘页数
            num_display_entries: 5, //主体页数
            callback: pageselectCallback,
            items_per_page: size, //每页显示1项
            prev_text:'上一页',
            next_text:'下一页',
            num_edge_entries:true
        });
    }

    function pageselectCallback(page_index, jq) {
        /*console.info(jq);*/
        toPage(page_index+1,'jiyejiazhuanfang', 'hxclub/article/pagelist.do', '#xCont', 'xScr', null, false, ZZ);
        return false;
    }

    function ZZ() {
        //;(function($){
        initPagination1(name);
            var aVideo=$('#xJsVideo li');

            aVideo.mouseover(function(){
                $(this).addClass('xShow2');
            });
            aVideo.mouseout(function(){
                $(this).removeClass('xShow2');
            });
        //})(jQuery);
    }
});
